package io;

import java.io.PrintWriter;

/**
 * @author Cheng Jun
 * Description: 字符打印流
 * @version 1.0
 * @date 2022/8/14 21:23
 * @see PrintWriter
 */
public class PrintWriterStream {

    public static void main(String[] args) {
        String str = "PrintWriter 字符打印流输出";
        // class java.io.PrintStream
        // System.out.println(System.out.getClass());
        PrintWriter printWriter = new PrintWriter(System.out);
        printWriter.print(str);
        // 所有的流都要记得关闭，不管是字符流还是字节流，节点流还是处理流，输入流还是输出流
        printWriter.close();
    }

}
